package com.snow.rbac.controller;


import com.snow.rbac.entity.Role;
import com.snow.rbac.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 角色表 前端控制器
 * </p>
 *
 * @author Yanke
 * @since 2021-06-30
 */
@RestController
@RequestMapping("/rbac/role")
public class RoleController {

    @Autowired
    private IRoleService roleService;

    @GetMapping("/{id}")
    public Role queryRole(@PathVariable(value = "id") Long id) {
        return roleService.getById(id);
    }

}
